<template>
  <a-button type="link" style="padding: 4px 6px" @click="onClick">
    查看
  </a-button>
  <view-drawer :context-data="propsDrawerData" v-model:open="open" />
</template>
<script setup>
import { ref } from 'vue'
import ViewDrawer from './role-view-drawer.vue'
/**
 * 外部参数
 */
let props = defineProps({
  data: { type: Object, required: true },
})

let open = ref(false)
let propsDrawerData = ref({})

/**
 * 查看操作
 */
function onClick() {
  open.value = true
  propsDrawerData.value = props.data
}
</script>
